.class Ldgb/t1$a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ldgb/g0;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Ldgb/t1;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "a"
.end annotation


# instance fields
.field private final a:Landroid/content/Context;

.field private final b:Ldgb/t1$b;

.field private c:Ldgb/s1;

.field private d:J

.field private e:J


# direct methods
.method public constructor <init>(Landroid/content/Context;Ldgb/t1$b;)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Ldgb/t1$b;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-object p1, p0, Ldgb/t1$a;->a:Landroid/content/Context;

    .line 3
    iput-object p2, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    .line 4
    invoke-static {}, Ldgb/s1;->a()Ldgb/s1;

    move-result-object p1

    iput-object p1, p0, Ldgb/t1$a;->c:Ldgb/s1;

    return-void
.end method

.method private a(Landroid/content/Context;Ldgb/i0;)I
    .locals 3
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Ldgb/i0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 41
    iget-object p1, p2, Ldgb/i0;->f:Ljava/io/File;

    .line 42
    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v1, v0, Ldgb/t1$b;->b:Ljava/lang/String;

    iget-object v0, v0, Ldgb/t1$b;->a:Ljava/lang/String;

    invoke-static {v1, v0}, Ldgb/u1;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;

    move-result-object v0

    iput-object v0, p2, Ldgb/i0;->f:Ljava/io/File;

    const/16 v1, 0x1ec

    if-eqz p1, :cond_2

    if-nez v0, :cond_0

    goto :goto_0

    .line 43
    :cond_0
    :try_start_0
    invoke-static {p1, v0}, Ldgb/s2;->a(Ljava/io/File;Ljava/io/File;)Z

    move-result p1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz p1, :cond_1

    const/16 p1, 0xc8

    return p1

    :catchall_0
    move-exception p1

    .line 44
    sget-boolean v0, Ldgb/o0;->c:Z

    if-eqz v0, :cond_1

    .line 45
    invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V

    .line 46
    :cond_1
    iget-object p1, p2, Ldgb/i0;->f:Ljava/io/File;

    invoke-virtual {p1}, Ljava/io/File;->delete()Z

    return v1

    .line 47
    :cond_2
    :goto_0
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "copy fail cacheFile="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p1, ", targetFile="

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object p1, p2, Ldgb/i0;->f:Ljava/io/File;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ldgb/s0;->b(Ljava/lang/String;)V

    return v1
.end method

.method private a(Landroid/content/Context;ILjava/lang/String;)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p3    # Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 38
    invoke-static {p3}, Ldgb/c1;->a(Ljava/lang/String;)Ldgb/m1;

    move-result-object p1

    if-eqz p1, :cond_0

    const/16 p3, 0xc8

    if-ne p2, p3, :cond_0

    .line 39
    invoke-virtual {p1}, Ldgb/m1;->b()Z

    move-result p2

    if-eqz p2, :cond_0

    .line 40
    invoke-static {}, Ldgb/m2;->e()Ldgb/m2;

    move-result-object p2

    invoke-virtual {p2, p1}, Ldgb/m2;->b(Ldgb/m1;)Z

    :cond_0
    return-void
.end method

.method private a(Ldgb/i0;Ljava/lang/String;J)V
    .locals 7
    .param p1    # Ldgb/i0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Ljava/lang/String;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 26
    iget-object v0, p1, Ldgb/i0;->f:Ljava/io/File;

    if-nez v0, :cond_0

    return-void

    .line 27
    :cond_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    .line 28
    iget-wide v2, p0, Ldgb/t1$a;->d:J

    sub-long v2, p3, v2

    const-wide/16 v4, 0x1000

    cmp-long v6, v2, v4

    if-lez v6, :cond_1

    iget-wide v2, p0, Ldgb/t1$a;->e:J

    sub-long v2, v0, v2

    const-wide/16 v4, 0x5dc

    cmp-long v6, v2, v4

    if-gtz v6, :cond_2

    :cond_1
    iget-wide v2, p1, Ldgb/i0;->c:J

    cmp-long v4, p3, v2

    if-nez v4, :cond_3

    .line 29
    :cond_2
    new-instance v2, Ldgb/a1;

    invoke-direct {v2}, Ldgb/a1;-><init>()V

    .line 30
    iput-object p2, v2, Ldgb/a1;->b:Ljava/lang/String;

    .line 31
    iget-object p2, p1, Ldgb/i0;->e:Ljava/lang/String;

    iput-object p2, v2, Ldgb/a1;->c:Ljava/lang/String;

    .line 32
    iget-object p2, p1, Ldgb/i0;->f:Ljava/io/File;

    invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p2

    iput-object p2, v2, Ldgb/a1;->d:Ljava/lang/String;

    .line 33
    iget-wide v3, p1, Ldgb/i0;->c:J

    .line 34
    iget p1, p1, Ldgb/i0;->d:I

    cmp-long p1, p3, v3

    .line 35
    iget-object p1, p0, Ldgb/t1$a;->c:Ldgb/s1;

    invoke-virtual {p1, v2}, Ldgb/s1;->a(Ldgb/a1;)V

    .line 36
    iput-wide p3, p0, Ldgb/t1$a;->d:J

    .line 37
    iput-wide v0, p0, Ldgb/t1$a;->e:J

    :cond_3
    return-void
.end method


# virtual methods
.method public a(Landroid/content/Context;Ldgb/i0;J)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Ldgb/i0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    iget-object p1, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object p1, p1, Ldgb/t1$b;->d:Ljava/lang/String;

    const-string p2, "preload_bkg"

    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-nez p1, :cond_1

    .line 2
    iget-object p1, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object p1, p1, Ldgb/t1$b;->d:Ljava/lang/String;

    const-string p2, "preload_file"

    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 3
    iget-object p1, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object p2, p1, Ldgb/t1$b;->a:Ljava/lang/String;

    iget-object p1, p1, Ldgb/t1$b;->b:Ljava/lang/String;

    invoke-static {p2, p1}, Ldgb/k2;->b(Ljava/lang/String;Ljava/lang/String;)Z

    goto :goto_0

    .line 4
    :cond_0
    iget-object p1, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object p2, p1, Ldgb/t1$b;->a:Ljava/lang/String;

    iget-object p1, p1, Ldgb/t1$b;->b:Ljava/lang/String;

    invoke-static {p2, p1}, Ldgb/k2;->a(Ljava/lang/String;Ljava/lang/String;)Z

    :cond_1
    :goto_0
    return-void
.end method

.method public a(Landroid/content/Context;Ldgb/i0;[B)V
    .locals 4
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Ldgb/i0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p3    # [B
        .annotation build Landroidx/annotation/Nullable;
        .end annotation
    .end param

    .line 5
    sget-boolean p3, Ldgb/o0;->c:Z

    if-eqz p3, :cond_0

    .line 6
    new-instance p3, Ljava/lang/StringBuilder;

    invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "download info extras is : "

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, v0, Ldgb/t1$b;->d:Ljava/lang/String;

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, ", uri is : "

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, v0, Ldgb/t1$b;->b:Ljava/lang/String;

    invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    invoke-static {p3}, Ldgb/s0;->b(Ljava/lang/String;)V

    .line 7
    :cond_0
    iget p3, p2, Ldgb/i0;->a:I

    const/16 v0, 0xc8

    if-ne p3, v0, :cond_1

    .line 8
    invoke-direct {p0, p1, p2}, Ldgb/t1$a;->a(Landroid/content/Context;Ldgb/i0;)I

    move-result p3

    iput p3, p2, Ldgb/i0;->a:I

    .line 9
    :cond_1
    iget p3, p2, Ldgb/i0;->a:I

    const-string v1, "preload_file"

    const-string v2, "preload_bkg"

    if-ne p3, v0, :cond_3

    iget-object p3, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object p3, p3, Ldgb/t1$b;->d:Ljava/lang/String;

    .line 10
    invoke-virtual {v2, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p3

    if-nez p3, :cond_3

    .line 11
    iget-object p3, p2, Ldgb/i0;->f:Ljava/io/File;

    if-eqz p3, :cond_3

    .line 12
    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object p3

    .line 13
    iget-object v0, p2, Ldgb/i0;->f:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    const/4 v3, 0x0

    invoke-virtual {p3, v0, v3}, Landroid/content/pm/PackageManager;->getPackageArchiveInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object p3

    if-eqz p3, :cond_3

    .line 14
    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, v0, Ldgb/t1$b;->d:Ljava/lang/String;

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 15
    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v3, v0, Ldgb/t1$b;->a:Ljava/lang/String;

    iget-object v0, v0, Ldgb/t1$b;->b:Ljava/lang/String;

    iget-object p3, p3, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-static {v3, v0, p3}, Ldgb/k2;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z

    goto :goto_0

    .line 16
    :cond_2
    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v3, v0, Ldgb/t1$b;->a:Ljava/lang/String;

    iget-object v0, v0, Ldgb/t1$b;->b:Ljava/lang/String;

    iget-object p3, p3, Landroid/content/pm/PackageInfo;->packageName:Ljava/lang/String;

    invoke-static {v3, v0, p3}, Ldgb/k2;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z

    .line 17
    :cond_3
    :goto_0
    iget-object p3, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, p3, Ldgb/t1$b;->a:Ljava/lang/String;

    iget-object p3, p3, Ldgb/t1$b;->b:Ljava/lang/String;

    invoke-static {v0, p3}, Ldgb/u1;->c(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p3

    .line 18
    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, v0, Ldgb/t1$b;->d:Ljava/lang/String;

    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_5

    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, v0, Ldgb/t1$b;->d:Ljava/lang/String;

    .line 19
    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_4

    goto :goto_1

    .line 20
    :cond_4
    invoke-static {}, Ldgb/p1;->d()Ldgb/p1;

    move-result-object v0

    invoke-virtual {v0, p3}, Ldgb/p1;->a(Ljava/lang/String;)Z

    move-result p3

    .line 21
    sget-boolean v0, Ldgb/o0;->c:Z

    if-eqz v0, :cond_6

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "dequeue download success: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    invoke-static {p3}, Ldgb/s0;->b(Ljava/lang/String;)V

    goto :goto_2

    .line 22
    :cond_5
    :goto_1
    invoke-static {}, Ldgb/p1;->c()Ldgb/p1;

    move-result-object v0

    invoke-virtual {v0, p3}, Ldgb/p1;->a(Ljava/lang/String;)Z

    move-result p3

    .line 23
    sget-boolean v0, Ldgb/o0;->c:Z

    if-eqz v0, :cond_6

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "dequeue preload success: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p3

    invoke-static {p3}, Ldgb/s0;->b(Ljava/lang/String;)V

    .line 24
    :cond_6
    :goto_2
    iget p3, p2, Ldgb/i0;->a:I

    iget-object v0, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, v0, Ldgb/t1$b;->a:Ljava/lang/String;

    invoke-direct {p0, p1, p3, v0}, Ldgb/t1$a;->a(Landroid/content/Context;ILjava/lang/String;)V

    .line 25
    invoke-static {}, Ldgb/q1;->a()Ldgb/q1;

    move-result-object p1

    iget p2, p2, Ldgb/i0;->a:I

    iget-object p3, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object v0, p3, Ldgb/t1$b;->d:Ljava/lang/String;

    iget-object p3, p3, Ldgb/t1$b;->a:Ljava/lang/String;

    invoke-virtual {p1, p2, v0, p3}, Ldgb/q1;->a(ILjava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public b(Landroid/content/Context;Ldgb/i0;J)V
    .locals 0
    .param p1    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p2    # Ldgb/i0;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    iget-object p1, p0, Ldgb/t1$a;->b:Ldgb/t1$b;

    iget-object p1, p1, Ldgb/t1$b;->a:Ljava/lang/String;

    invoke-direct {p0, p2, p1, p3, p4}, Ldgb/t1$a;->a(Ldgb/i0;Ljava/lang/String;J)V

    return-void
.end method
